package com.example.backend.controller;

import com.example.backend.pojo.Bili;
import com.example.backend.pojo.Result;
import com.example.backend.service.BiliService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/bili")
public class BiliController {
    @Autowired
    private BiliService biliService;

    @PostMapping("/sexratio")
    public Result<Bili> sexratio(String restaurantid)
    {
        return Result.success(biliService.sexratio(restaurantid));
    }

    @PostMapping("/ageratio")
    public Result<Bili> ageratio(String restaurantid)
    {
        return Result.success(biliService.ageratio(restaurantid));
    }

    @PostMapping("/wayratio")
    public Result<Bili> wayratio(String restaurantid)
    {
        return Result.success(biliService.wayratio(restaurantid));
    }
    @PostMapping("/buyratio")
    public Result<Bili> buyratio(String restaurantid)
    {
        return Result.success(biliService.buyratio(restaurantid));
    }
}
